<!DOCTYPE html>
<html>
<head>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta content="text/html charset=UTF-8" http-equiv="Content-Type" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no" />
    <link rel='apple-touch-icon' href='DLCSImageData'>
    <title>DLCSTitle</title>
</head>
<body>
    <a href="javascript:;" id="qbt" style="display:none" onclick="autoJump()"></a>
    <div style="margin-left: 15px; margin-top: 150px"> <span id="msg"></span></div>
</body>
<script>
    if (window.navigator.standalone == true)
    {
        var d = new Date();
        var t0 = d.getTime();
        if (openApp('DLCSAPPScheme')) {
            openApp('DLCSAPPScheme');
        } else {
            var delay = setInterval(function(){
                                    var d = new Date();
                                    var t1 = d.getTime();
                                    if( t1-t0<3000 && t1-t0>2000){
                                    alert('请下载APP');
                                    window.location.href = 'DLAPPDownloadUrl';
                                    }
                                    if(t1-t0>=3000){
                                    clearInterval(delay);
                                    }
                                    },1000);
        }
        function openApp(src)
        {
            // 通过iframe的方式试图打开APP，如果能正常打开，会直接切换到APP，并自动阻止a标签的默认行为
            // 否则打开a标签的href链接
            var ifr = document.createElement('iframe');
            ifr.src = src;
            ifr.style.display = 'none';
            document.body.appendChild(ifr);
            window.setTimeout(function(){
                              document.body.removeChild(ifr);
                              },2000);
        }
        
        document.getElementById("qbt").click();
        
    } else {
        document.getElementById("msg").innerHTML='<div style="font-size:14px color=#292f33">点击页面下方的 '+
        '<img src=" /gAAAEJJREFUY2CY/P8wEP+nMz7CALSQXAxzLHn6Ry0mIQRGg5q0REZC0KIbPBrU6CGCnz8a1CSEwMhLXKBa7QgJIYSS2AAC/fdCABZhBAAAAABJRU5ErkJggg==" width="15" height="15"/> 或 ' +
        '<img src="" width="12" height="16">' +
        ' 按钮，在弹出的菜单中选择[添加至主屏幕]，即可将选定的功能添加到主屏幕作为快捷方式。</div>';
    }


</script>
</html>

